package com.aaa.dem1109.观察者模式;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/9  18:15
 */
public class Test {
    public static void main(String[] args) {
        AAApublic aaApublic = new AAApublic();
        User user = new User("张三");
        User user1 = new User("李四");
        User user2 = new User("王五");
        User user3 = new User("赵六");

        aaApublic.guanzhu(user);
        aaApublic.guanzhu(user1);
        aaApublic.guanzhu(user2);
        aaApublic.guanzhu(user3);

        aaApublic.setMsg("8*8*88*");

        aaApublic.qunfa();

        aaApublic.quxiao(user);
        System.out.println("----------");
        aaApublic.qunfa();
    }
}
